-- created by kumiler
-- on 2023/1/5 9:21
-- DESC

create external table spmi_dim.dim_spmi_pcp_waybill_mt
(
	id bigint  comment '主键id',
	waybill_month date  comment '运单月份',
	send_financial_center_name string  comment '寄件代理区',
	send_financial_center_code string  comment '寄件代理区编码',
	policy_name string  comment '政策名称',
	send_network_name string  comment '寄件网点',
	send_network_code string  comment '寄件网点编码',
	subsidy decimal(12,2)  comment '单票激励补贴',
	destination_name string  comment '目的省份',
	destination_code string  comment '目的省份编码',
	create_time timestamp  comment '创建时间',
	date_flag       smallint comment '月份类型 1-运单录入维度 2-入账日期维度'
) COMMENT '单票运单录入时间单票政策'
    PARTITIONED BY (mt string COMMENT '运单月份yyyy-MM')
    stored as parquet
    LOCATION '/dw/hive/spmi_dim.db/external/dim_spmi_pcp_waybill_mt'
;